<template>
  <Card title="水质感官指标(群众感受)">
    <template #content>
      <div class="left-card2">{{ currentLabel }}</div>
    </template>
  </Card>
</template>
<script setup>
defineOptions({
  name: "LeftCard2",
  inheritAttrs: false,
});
const props = defineProps({
  data: {
    type: Object,
    default: () => {},
  },
});
import { ref, onMounted } from "vue";

const crowd_dict = CROWD_DICT;
const currentLabel = ref("");

onMounted(() => {
  const question = QUESTION.slice(3);
  const currentQuestion = question[props.data.hottest_item.question_index];
  Object.keys(crowd_dict).map((item) => {
    if (currentQuestion.label.includes(item)) {
      currentLabel.value = crowd_dict[item];
    }
  });
});
</script>
<style lang="scss" scoped>
.left-card2 {
  background: #cddaea;
  border: 1px solid #ffffff;
  margin: 26px 19px 25px 19px;
  padding: 11px 14px;
}
</style>
